package net.findkrypton.util;

import java.net.URL;

public class UPath {
	private static final String projectPath;
	static {
		URL url = UPath.class.getResource("/");
		String path=url.getFile();
		int index=path.lastIndexOf('/',path.length()-2);
		projectPath= path.substring(1,index);
	}
	
	public static String projectPath(String absPath) {
		if(absPath.startsWith("/") || absPath.startsWith("\\")) {
			return projectPath+absPath;
		}
		return projectPath+"/"+absPath;
	}
}
